<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SARibbon: SARibbonMainWindow类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="SA-logo.png"/></td>
  <td id="projectalign">
   <div id="projectname">SARibbon<span id="projectnumber">&#160;2.4.2</span>
   </div>
   <div id="projectbrief">SARibbon wiki</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('class_s_a_ribbon_main_window.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#properties">属性</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="class_s_a_ribbon_main_window-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">SARibbonMainWindow类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>如果要使用SARibbonBar，必须使用此类代替QMainWindow  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_s_a_ribbon_main_window_8h_source.html">SARibbonMainWindow.h</a>&gt;</code></p>
<div class="dynheader">
类 SARibbonMainWindow 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_s_a_ribbon_main_window.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_a_ribbon_main_window_1_1_private_data.html">PrivateData</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SARibbonMainWindowPrivate class  <a href="class_s_a_ribbon_main_window_1_1_private_data.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a952b22f2edaf2e577d344e1622b157e6" id="r_a952b22f2edaf2e577d344e1622b157e6"><td class="memItemLeft" align="right" valign="top"><a id="a952b22f2edaf2e577d344e1622b157e6" name="a952b22f2edaf2e577d344e1622b157e6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>SARibbonMainWindow</b> (QWidget *parent=nullptr, SARibbonMainWindowStyles style={ static_cast&lt; int &gt;(SARibbonMainWindowStyleFlag::UseRibbonMenuBar)|static_cast&lt; int &gt;(SARibbonMainWindowStyleFlag::UseRibbonFrame) }, const Qt::WindowFlags flags=Qt::WindowFlags())</td></tr>
<tr class="separator:a952b22f2edaf2e577d344e1622b157e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1abb8396bcfddfdc41657e36d577b50c" id="r_a1abb8396bcfddfdc41657e36d577b50c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1abb8396bcfddfdc41657e36d577b50c">ribbonBar</a> () const</td></tr>
<tr class="memdesc:a1abb8396bcfddfdc41657e36d577b50c"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回ribbonbar，如果不是使用ribbon模式，返回nullptr  <br /></td></tr>
<tr class="separator:a1abb8396bcfddfdc41657e36d577b50c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3511b5b43a6a474fb1da136299d1baeb" id="r_a3511b5b43a6a474fb1da136299d1baeb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3511b5b43a6a474fb1da136299d1baeb">setRibbonBar</a> (<a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> *ribbon)</td></tr>
<tr class="memdesc:a3511b5b43a6a474fb1da136299d1baeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置ribbonbar  <br /></td></tr>
<tr class="separator:a3511b5b43a6a474fb1da136299d1baeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f096ede68e617763f06f18f14dae797" id="r_a9f096ede68e617763f06f18f14dae797"><td class="memItemLeft" align="right" valign="top"><a id="a9f096ede68e617763f06f18f14dae797" name="a9f096ede68e617763f06f18f14dae797"></a>
<a class="el" href="class_s_a_frameless_helper.html">SAFramelessHelper</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>framelessHelper</b> ()</td></tr>
<tr class="separator:a9f096ede68e617763f06f18f14dae797"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85a9001462998c2a942476f9f409c264" id="r_a85a9001462998c2a942476f9f409c264"><td class="memItemLeft" align="right" valign="top"><a id="a85a9001462998c2a942476f9f409c264" name="a85a9001462998c2a942476f9f409c264"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>updateWindowFlag</b> (Qt::WindowFlags flags)</td></tr>
<tr class="memdesc:a85a9001462998c2a942476f9f409c264"><td class="mdescLeft">&#160;</td><td class="mdescRight">此函数仅用于控制最小最大化和关闭按钮的显示 <br /></td></tr>
<tr class="separator:a85a9001462998c2a942476f9f409c264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa46d6ad466c111e657ef3b00c0944d65" id="r_aa46d6ad466c111e657ef3b00c0944d65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa46d6ad466c111e657ef3b00c0944d65">setRibbonTheme</a> (SARibbonTheme theme)</td></tr>
<tr class="memdesc:aa46d6ad466c111e657ef3b00c0944d65"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="#aa46d6ad466c111e657ef3b00c0944d65" title="SARibbonMainWindow::setRibbonTheme">SARibbonMainWindow::setRibbonTheme</a>  <br /></td></tr>
<tr class="separator:aa46d6ad466c111e657ef3b00c0944d65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95740d87cda5203d929d83934055501b" id="r_a95740d87cda5203d929d83934055501b"><td class="memItemLeft" align="right" valign="top"><a id="a95740d87cda5203d929d83934055501b" name="a95740d87cda5203d929d83934055501b"></a>
SARibbonTheme&#160;</td><td class="memItemRight" valign="bottom"><b>ribbonTheme</b> () const</td></tr>
<tr class="separator:a95740d87cda5203d929d83934055501b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab75bde5678fec3c9f240fc4c0a21a337" id="r_ab75bde5678fec3c9f240fc4c0a21a337"><td class="memItemLeft" align="right" valign="top"><a id="ab75bde5678fec3c9f240fc4c0a21a337" name="ab75bde5678fec3c9f240fc4c0a21a337"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isUseRibbon</b> () const</td></tr>
<tr class="separator:ab75bde5678fec3c9f240fc4c0a21a337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64033a0f366f8417344070ca3d5e42f7" id="r_a64033a0f366f8417344070ca3d5e42f7"><td class="memItemLeft" align="right" valign="top"><a id="a64033a0f366f8417344070ca3d5e42f7" name="a64033a0f366f8417344070ca3d5e42f7"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>eventFilter</b> (QObject *obj, QEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a64033a0f366f8417344070ca3d5e42f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad27f735390e0da5e6bc866dc8c288119" id="r_ad27f735390e0da5e6bc866dc8c288119"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_a_ribbon_system_button_bar.html">SARibbonSystemButtonBar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad27f735390e0da5e6bc866dc8c288119">windowButtonBar</a> () const</td></tr>
<tr class="memdesc:ad27f735390e0da5e6bc866dc8c288119"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取系统按钮组，可以在此基础上添加其他按钮  <br /></td></tr>
<tr class="separator:ad27f735390e0da5e6bc866dc8c288119"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8373c6b31850ffb6e54ea082e933aa0e" id="r_a8373c6b31850ffb6e54ea082e933aa0e"><td class="memItemLeft" align="right" valign="top">SARibbonMainWindowStyles&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8373c6b31850ffb6e54ea082e933aa0e">ribbonMainwindowStyle</a> () const</td></tr>
<tr class="memdesc:a8373c6b31850ffb6e54ea082e933aa0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前ribbonMainWidow的样式  <br /></td></tr>
<tr class="separator:a8373c6b31850ffb6e54ea082e933aa0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:adf45496bf6e43d194f90d59bc4c1546b" id="r_adf45496bf6e43d194f90d59bc4c1546b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adf45496bf6e43d194f90d59bc4c1546b">createRibbonBar</a> ()</td></tr>
<tr class="memdesc:adf45496bf6e43d194f90d59bc4c1546b"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建ribbonbar的工厂函数  <br /></td></tr>
<tr class="separator:adf45496bf6e43d194f90d59bc4c1546b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="properties" name="properties"></a>
属性</h2></td></tr>
<tr class="memitem:a63d0344f86c48fedd89b122a41c199cd" id="r_a63d0344f86c48fedd89b122a41c199cd"><td class="memItemLeft" align="right" valign="top"><a id="a63d0344f86c48fedd89b122a41c199cd" name="a63d0344f86c48fedd89b122a41c199cd"></a>
SARibbonTheme&#160;</td><td class="memItemRight" valign="bottom"><b>ribbonTheme</b></td></tr>
<tr class="separator:a63d0344f86c48fedd89b122a41c199cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:a1fb4c4fe02f19abd32864cc35bc2417a" id="r_a1fb4c4fe02f19abd32864cc35bc2417a"><td class="memItemLeft" align="right" valign="top"><a id="a1fb4c4fe02f19abd32864cc35bc2417a" name="a1fb4c4fe02f19abd32864cc35bc2417a"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>SARibbonBar</b></td></tr>
<tr class="separator:a1fb4c4fe02f19abd32864cc35bc2417a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>如果要使用SARibbonBar，必须使用此类代替QMainWindow </p>
<p>由于ribbon的风格和传统的Toolbar风格差异较大， SARibbonBar使用需要把原有的QMainWindow替换为SARibbonMainWindow, SARibbonMainWindow是个无边框窗体，继承自QMainWindow（目前使用第三方的无边框方案https://github.com/wangwenx190/framelesshelper）， 其构造函数的参数useRibbon用于指定是否使用ribbon风格，默认为true</p>
<div class="fragment"><div class="line"><a class="code hl_class" href="class_s_a_ribbon_main_window.html">SARibbonMainWindow</a>(QWidget* parent = <span class="keyword">nullptr</span>,<span class="keywordtype">bool</span> useRibbon = <span class="keyword">true</span>);</div>
<div class="ttc" id="aclass_s_a_ribbon_main_window_html"><div class="ttname"><a href="class_s_a_ribbon_main_window.html">SARibbonMainWindow</a></div><div class="ttdoc">如果要使用SARibbonBar，必须使用此类代替QMainWindow</div><div class="ttdef"><b>Definition</b> SARibbonMainWindow.h:60</div></div>
</div><!-- fragment --><p>如果想换回非ribbon风格，只需要把useRibbon设置为false即可, 成员函数isUseRibbon用于判断当前是否为ribbon模式，这个函数在兼容传统Toolbar风格和ribbon风格时非常有用</p>
<p>但这个不支持动态切换，因此，实际工程中，你若要进行切换，需要写配置文件，程序在构造时传入模式， 并且，你的程序要做好判断，因为非Ribbon模式下，所有Ribbon相关的接口都会返回空指针</p>
<div class="fragment"><div class="line"><span class="keywordtype">bool</span> isUseRibbon() <span class="keyword">const</span>;</div>
</div><!-- fragment --><p><a class="el" href="class_s_a_ribbon_main_window.html">SARibbonMainWindow</a> 提供了几种常用的ribbon样式 通过<a class="el" href="#aa46d6ad466c111e657ef3b00c0944d65">setRibbonTheme</a> 可改变ribbon的样式，用户也可通过qss自己定义自己的样式</p>
<p>如果你自己继承了SARibbonBar，你可以通过<a class="el" href="#a3511b5b43a6a474fb1da136299d1baeb">setRibbonBar</a> 设置自己的ribbonbar进去</p>
<p>另外有个一个更加高效的方法，来实现自定义的Ribbon，就是继承一个<a class="el" href="class_s_a_ribbon_element_factory.html">SARibbonElementFactory</a></p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyRibbonFactory:<span class="keyword">public</span> <a class="code hl_class" href="class_s_a_ribbon_element_factory.html">SARibbonElementFactory</a>{</div>
<div class="line">...</div>
<div class="line">virtual <a class="code hl_class" href="class_s_a_ribbon_bar.html">SARibbonBar</a>* createRibbonBar(QWidget* parent){</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">new</span> MyRibbonBar(parent);</div>
<div class="line">}</div>
<div class="line">};</div>
<div class="ttc" id="aclass_s_a_ribbon_bar_html"><div class="ttname"><a href="class_s_a_ribbon_bar.html">SARibbonBar</a></div><div class="ttdoc">SARibbonBar继承于QMenuBar,在SARibbonMainWindow中直接替换了原来的QMenuBar</div><div class="ttdef"><b>Definition</b> SARibbonBar.h:93</div></div>
<div class="ttc" id="aclass_s_a_ribbon_element_factory_html"><div class="ttname"><a href="class_s_a_ribbon_element_factory.html">SARibbonElementFactory</a></div><div class="ttdoc">SARibbon的子元素创建的工厂，SARibbon内部创建子元素都通过SARibbonElementFactory来创建</div><div class="ttdef"><b>Definition</b> SARibbonElementFactory.h:35</div></div>
</div><!-- fragment --><p>SARibbonMainWindow生成之前(一般在main函数），设置元件工厂：</p>
<div class="fragment"><div class="line">SARibbonElementManager::instance()-&gt;setupFactory(<span class="keyword">new</span> MyRibbonFactory());</div>
</div><!-- fragment --><p>此时，Ribbon的元素会通过MyRibbonFactory的接口来生成 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="adf45496bf6e43d194f90d59bc4c1546b" name="adf45496bf6e43d194f90d59bc4c1546b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf45496bf6e43d194f90d59bc4c1546b">&#9670;&#160;</a></span>createRibbonBar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> * SARibbonMainWindow::createRibbonBar </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>创建ribbonbar的工厂函数 </p>
<p>用户如果重写了SARibbonBar，可以通过重新此虚函数返回自己的Ribbon实例 </p><dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a1abb8396bcfddfdc41657e36d577b50c" name="a1abb8396bcfddfdc41657e36d577b50c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1abb8396bcfddfdc41657e36d577b50c">&#9670;&#160;</a></span>ribbonBar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> * SARibbonMainWindow::ribbonBar </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回ribbonbar，如果不是使用ribbon模式，返回nullptr </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a8373c6b31850ffb6e54ea082e933aa0e" name="a8373c6b31850ffb6e54ea082e933aa0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8373c6b31850ffb6e54ea082e933aa0e">&#9670;&#160;</a></span>ribbonMainwindowStyle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SARibbonMainWindowStyles SARibbonMainWindow::ribbonMainwindowStyle </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取当前ribbonMainWidow的样式 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a3511b5b43a6a474fb1da136299d1baeb" name="a3511b5b43a6a474fb1da136299d1baeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3511b5b43a6a474fb1da136299d1baeb">&#9670;&#160;</a></span>setRibbonBar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonMainWindow::setRibbonBar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_s_a_ribbon_bar.html">SARibbonBar</a> *</td>          <td class="paramname"><span class="paramname"><em>ribbon</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置ribbonbar </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bar</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa46d6ad466c111e657ef3b00c0944d65" name="aa46d6ad466c111e657ef3b00c0944d65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa46d6ad466c111e657ef3b00c0944d65">&#9670;&#160;</a></span>setRibbonTheme()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonMainWindow::setRibbonTheme </td>
          <td>(</td>
          <td class="paramtype">SARibbonTheme</td>          <td class="paramname"><span class="paramname"><em>theme</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="#aa46d6ad466c111e657ef3b00c0944d65" title="SARibbonMainWindow::setRibbonTheme">SARibbonMainWindow::setRibbonTheme</a> </p>
<p>注意某些版本的qt，在构造函数设置主题会不完全生效，可以使用QTimer投放到队列最后执行，如： </p><div class="fragment"><div class="line">QTimer::singleShot(0, <span class="keyword">this</span>, [ <span class="keyword">this</span> ]() { this-&gt;<a class="code hl_function" href="#aa46d6ad466c111e657ef3b00c0944d65">setRibbonTheme</a>(SARibbonMainWindow::RibbonThemeDark); });</div>
<div class="ttc" id="aclass_s_a_ribbon_main_window_html_aa46d6ad466c111e657ef3b00c0944d65"><div class="ttname"><a href="#aa46d6ad466c111e657ef3b00c0944d65">SARibbonMainWindow::setRibbonTheme</a></div><div class="ttdeci">void setRibbonTheme(SARibbonTheme theme)</div><div class="ttdoc">SARibbonMainWindow::setRibbonTheme</div><div class="ttdef"><b>Definition</b> SARibbonMainWindow.cpp:332</div></div>
</div><!-- fragment --><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">theme</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad27f735390e0da5e6bc866dc8c288119" name="ad27f735390e0da5e6bc866dc8c288119"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad27f735390e0da5e6bc866dc8c288119">&#9670;&#160;</a></span>windowButtonBar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_a_ribbon_system_button_bar.html">SARibbonSystemButtonBar</a> * SARibbonMainWindow::windowButtonBar </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取系统按钮组，可以在此基础上添加其他按钮 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/<a class="el" href="_s_a_ribbon_main_window_8h_source.html">SARibbonMainWindow.h</a></li>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/<b>SARibbonMainWindow.cpp</b></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_s_a_ribbon_main_window.html">SARibbonMainWindow</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
